Add descriptions for the commandline arguments. The actual descriptions
authorMatthias Clasen <maclas@gmx.de>
Sun, 5 Sep 2004 21:15:58 +0000 (21:15 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 5 Sep 2004 21:15:58 +0000 (21:15 +0000)
Sun Sep  5 17:14:16 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkmain.c:
* gdk/gdk.c:
* gdk/x11/gdkmain-x11.c:
* gdk/win32/gdkmain-win32.c: Add descriptions for the
commandline arguments. The actual descriptions are mostly
taken from libbonoboui, so translators should be able to
copy existing translations from there.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdk.c
gdk/win32/gdkmain-win32.c
gdk/x11/gdkmain-x11.c
gtk/gtkmain.c

index 2b453deb289053a99cc304a7ff1ab0c8f2f75ae6..a1e89f1befd43c6cfdaeac3c762cc2cbc790db28 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Sun Sep  5 17:14:16 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkmain.c: 
+       * gdk/gdk.c: 
+       * gdk/x11/gdkmain-x11.c: 
+       * gdk/win32/gdkmain-win32.c: Add descriptions for the 
+       commandline arguments. The actual descriptions are mostly 
+       taken from libbonoboui, so translators should be able to 
+       copy existing translations from there.
+
 2004-09-05  Anders Carlsson  <andersca@gnome.org>
 
        * gdk/gdk.symbols:
index 2b453deb289053a99cc304a7ff1ab0c8f2f75ae6..a1e89f1befd43c6cfdaeac3c762cc2cbc790db28 100644 (file)
@@ -1,3 +1,13 @@
+Sun Sep  5 17:14:16 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkmain.c: 
+       * gdk/gdk.c: 
+       * gdk/x11/gdkmain-x11.c: 
+       * gdk/win32/gdkmain-win32.c: Add descriptions for the 
+       commandline arguments. The actual descriptions are mostly 
+       taken from libbonoboui, so translators should be able to 
+       copy existing translations from there.
+
 2004-09-05  Anders Carlsson  <andersca@gnome.org>
 
        * gdk/gdk.symbols:
index 2b453deb289053a99cc304a7ff1ab0c8f2f75ae6..a1e89f1befd43c6cfdaeac3c762cc2cbc790db28 100644 (file)
@@ -1,3 +1,13 @@
+Sun Sep  5 17:14:16 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkmain.c: 
+       * gdk/gdk.c: 
+       * gdk/x11/gdkmain-x11.c: 
+       * gdk/win32/gdkmain-win32.c: Add descriptions for the 
+       commandline arguments. The actual descriptions are mostly 
+       taken from libbonoboui, so translators should be able to 
+       copy existing translations from there.
+
 2004-09-05  Anders Carlsson  <andersca@gnome.org>
 
        * gdk/gdk.symbols:
index 2b453deb289053a99cc304a7ff1ab0c8f2f75ae6..a1e89f1befd43c6cfdaeac3c762cc2cbc790db28 100644 (file)
@@ -1,3 +1,13 @@
+Sun Sep  5 17:14:16 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkmain.c: 
+       * gdk/gdk.c: 
+       * gdk/x11/gdkmain-x11.c: 
+       * gdk/win32/gdkmain-win32.c: Add descriptions for the 
+       commandline arguments. The actual descriptions are mostly 
+       taken from libbonoboui, so translators should be able to 
+       copy existing translations from there.
+
 2004-09-05  Anders Carlsson  <andersca@gnome.org>
 
        * gdk/gdk.symbols:
index 47c8029ff795a35d8cb15c8f6a5c22c94d2acc93..c1c30b2f0d73340855fc35caff0aec06eec5d3ec 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -32,6 +32,7 @@
 #include "gdkalias.h"
 #include "gdk.h"
 #include "gdkinternals.h"
+#include "gdkintl.h"
 
 #ifndef HAVE_XCONVERTCASE
 #include "gdkkeysyms.h"
@@ -112,14 +113,26 @@ gdk_arg_name_cb (const char *key, const char *value, gpointer user_data, GError
 }
 
 static GOptionEntry gdk_args[] = {
-  { "class",        0, 0,                     G_OPTION_ARG_CALLBACK, gdk_arg_class_cb,    NULL, NULL },
-  { "name",         0, 0,                     G_OPTION_ARG_CALLBACK, gdk_arg_name_cb,     NULL, NULL },
-  { "display",      0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING,   &_gdk_display_name,  NULL, NULL },
-  { "screen",       0, 0,                     G_OPTION_ARG_INT,      &_gdk_screen_number, NULL, NULL },
+  { "class",        0, 0,                     G_OPTION_ARG_CALLBACK, gdk_arg_class_cb,
+    /* Description of --class=CLASS in --help output */        N_("Program class as used by the window manager"),
+    /* Placeholder in --class=CLASS in --help output */        N_("CLASS") },
+  { "name",         0, 0,                     G_OPTION_ARG_CALLBACK, gdk_arg_name_cb,
+    /* Description of --name=NAME in --help output */          N_("Program name as used by the window manager"),
+    /* Placeholder in --name=NAME in --help output */          N_("NAME") },
+  { "display",      0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING,   &_gdk_display_name,
+    /* Description of --display=DISPLAY in --help output */    N_("X display to use"),
+    /* Placeholder in --display=DISPLAY in --help output */    N_("DISPLAY") },
+  { "screen",       0, 0, G_OPTION_ARG_INT,      &_gdk_screen_number,
+    /* Description of --screen=SCREEN in --help output */      N_("X screen to use"),
+    /* Placeholder in --screen=SCREEN in --help output */      N_("SCREEN") },
 #ifdef G_ENABLE_DEBUG
-  { "gdk-debug",    0, 0,                    G_OPTION_ARG_CALLBACK, gdk_arg_debug_cb,    NULL, NULL },
-  { "gdk-no-debug", 0, 0,                    G_OPTION_ARG_CALLBACK, gdk_arg_no_debug_cb, NULL, NULL },
-#endif /* G_ENABLE_DEBUG */
+  { "gdk-debug",    0, 0, G_OPTION_ARG_CALLBACK, gdk_arg_debug_cb,  
+    /* Description of --gdk-debug=FLAGS in --help output */    N_("Gdk debugging flags to set"),
+    /* Placeholder in --gdk-debug=FLAGS in --help output */    N_("FLAGS") },
+  { "gdk-no-debug", 0, 0, G_OPTION_ARG_CALLBACK, gdk_arg_no_debug_cb, 
+    /* Description of --gdk-no-debug=FLAGS in --help output */ N_("Gdk debugging flags to unset"), 
+    /* Placeholder in --gdk-no-debug=FLAGS in --help output */ N_("FLAGS") },
+#endif 
   { NULL }
 };
 
index 7f54dda022202e0757dcf965b8d33b55f51262d2..ebe0c135398e9d650faa6910cd0e5c984a215450 100644 (file)
@@ -37,6 +37,7 @@
 #include "gdkregion-generic.h"
 #include "gdkkeysyms.h"
 #include "gdkinternals.h"
+#include "gdkintl.h"
 #include "gdkprivate-win32.h"
 #include "gdkinput-win32.h"
 
 static gboolean gdk_synchronize = FALSE;
 
 GOptionEntry _gdk_windowing_args[] = {
-  { "sync", 0, 0, G_OPTION_ARG_NONE, &_gdk_synchronize, NULL, NULL },
-  { "no-wintab", 0, 0, G_OPTION_ARG_NONE, &_gdk_input_ignore_wintab, NULL, NULL },
-  { "ignore-wintab", 0, 0, G_OPTION_ARG_NONE, &_gdk_input_ignore_wintab, NULL, NULL },
+  { "sync", 0, 0, G_OPTION_ARG_NONE, &_gdk_synchronize, 
+    /* Description of --sync in --help output */              N_("Don't batch GDI requests"), NULL },
+  { "no-wintab", 0, 0, G_OPTION_ARG_NONE, &_gdk_input_ignore_wintab, 
+    /* Description of --no-wintab in --help output */         N_("Don't use the Wintab API for tablet support [default]"), NULL },
+  { "ignore-wintab", 0, 0, G_OPTION_ARG_NONE, &_gdk_input_ignore_wintab, 
+    /* Description of --ignore-wintab in --help output */     N_("Same as --no-wintab"), NULL },
 #if 0
   { "use-wintab", 0, 0, G_OPTION_ARG_NONE, &_gdk_input_ignore_wintab, NULL, NULL },
 #endif
-  { "max-colors", 0, 0, G_OPTION_ARG_INT, &_gdk_max_colors, NULL, NULL },
+  { "max-colors", 0, 0, G_OPTION_ARG_INT, &_gdk_max_colors, 
+    /* Description of --max-colors=COLORS in --help output */ N_("Size of the palette in 8 bit mode"), 
+    /* Placeholder in --max-colors=COLORS in --help output */ N_("COLORS") },
   { NULL }
 };
 
index c6e7c8bf921350ef77afba23a0b37f94564668f3..ae9a22200f02b5d67293f7cdc12b13851b3df4fb 100644 (file)
@@ -47,6 +47,7 @@
 #include "gdkx.h"
 #include "gdkdisplay-x11.h"
 #include "gdkinternals.h"
+#include "gdkintl.h"
 #include "gdkregion-generic.h"
 #include "gdkinputprivate.h"
 
@@ -87,7 +88,8 @@ static GSList *gdk_error_traps = NULL;               /* List of error traps */
 static GSList *gdk_error_trap_free_list = NULL;      /* Free list */
 
 GOptionEntry _gdk_windowing_args[] = {
-  { "sync", 0, 0, G_OPTION_ARG_NONE, &_gdk_synchronize, NULL, NULL },
+  { "sync", 0, 0, G_OPTION_ARG_NONE, &_gdk_synchronize, 
+    /* Description of --sync in --help output */ N_("Make X calls synchronous"), NULL },
   { NULL }
 };
 
index d699c96724259f62c611ca9c2a0c6b9e388cb3f9..9f2baa483cca8431607bb3d76e63be491599cbc5 100644 (file)
@@ -399,12 +399,19 @@ gtk_arg_warnings_cb (const char *key, const char *value, gpointer user_data)
 }
 
 static GOptionEntry gtk_args[] = {
-  { "gtk-module",       0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_module_cb,   NULL, NULL },
-  { "g-fatal-warnings", 0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_warnings_cb, NULL, NULL },
+  { "gtk-module",       0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_module_cb,   
+    /* Description of --gtk-module=MODULES in --help output */ N_("Load additional GTK+ modules"), 
+    /* Placeholder in --gtk-module=MODULES in --help output */ N_("MODULES") },
+  { "g-fatal-warnings", 0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_warnings_cb, 
+    /* Description of --g-fatal-warnings in --help output */   N_("Make all warnings fatal"), NULL },
 #ifdef G_ENABLE_DEBUG
-  { "gtk-debug",        0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_debug_cb,    NULL, NULL },
-  { "gtk-no-debug",     0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_no_debug_cb, NULL, NULL },
-#endif /* G_ENABLE_DEBUG */
+  { "gtk-debug",        0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_debug_cb,    
+    /* Description of --gtk-debug=FLAGS in --help output */    N_("GTK+ debugging flags to set"), 
+    /* Placeholder in --gtk-debug=FLAGS in --help output */    N_("FLAGS") },
+  { "gtk-no-debug",     0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_no_debug_cb, 
+    /* Description of --gtk-no-debug=FLAGS in --help output */ N_("GTK+ debugging flags to unset"), 
+    /* Placeholder in --gtk-no-debug=FLAGS in --help output */ N_("FLAGS") },
+#endif 
   { NULL }
 };
 
@@ -543,6 +550,7 @@ gtk_get_option_group (gboolean open_default_display)
 
   gdk_add_option_entries_libgtk_only (group);
   g_option_group_add_entries (group, gtk_args);
+  g_option_group_set_translation_domain (group, GETTEXT_PACKAGE);
   
   return group;
 }
@@ -613,7 +621,7 @@ gtk_parse_args (int    *argc,
   g_option_context_set_ignore_unknown_options (option_context, TRUE);
   g_option_context_set_help_enabled (option_context, FALSE);
   
-  g_option_context_add_main_entries (option_context, gtk_args, NULL);
+  g_option_context_add_main_entries (option_context, gtk_args, GETTEXT_PACKAGE);
 
   g_option_context_parse (option_context, argc, argv, NULL);
   g_option_context_free (option_context);